// pch.h: This is a precompiled header file.
// Files listed below are compiled only once, improving build performance for future builds.
// This also affects IntelliSense performance, including code completion and many code browsing features.
// However, files listed here are ALL re-compiled if any one of them is updated between builds.
// Do not add files here that you will be updating frequently as this negates the performance advantage.

#ifndef PPF_H
#define PPF_H
//#include<unordered_map>

#ifdef __cplusplus
extern "C"
{
#endif

    typedef struct Ppf_Recommand_Params {
        int circle, is_inverse_normal;
        float model_sample, scene_sample;
        int max_votes;
        int scenesampling_rate;
        double angle_disc_step, dis_disc_step;
        double pose_cluster_threold;

    }Ppf_Recommand_Params;

    static inline void ppf_recommand_params_init(Ppf_Recommand_Params* prp)
    {
        prp->circle = 0; prp->is_inverse_normal = 1;
        prp->model_sample = 0.015; prp->scene_sample = 0.012;
        prp->max_votes = 30;;
        prp->scenesampling_rate = 5;
        prp->angle_disc_step = 3.1415926 * 12.0 / 180.0;
        prp->dis_disc_step = 0.01;
        prp->pose_cluster_threold = 0.04;
    }
    typedef struct Ppf_Out{
        double** mats;
        double* scores;
        int l;
        void *prop;

    }Ppf_Out;

    //typedef struct MY_PPFHashMapSearch {
    //    std::unordered_multimap<MY_HashKeyStruct,
    //        std::pair<std::size_t, std::size_t>,
    //        MY_HashKeyStruct> feature_hash_map_;
    //    bool internals_initialized_;

    //    float angle_discretization_step_, distance_discretization_step_;
    //    float max_dist_;
    //    double** alpha_m;

    //}MY_PPFHashMapSearch;


    void* compute_model_feature(double**model,int len1 , Ppf_Recommand_Params* prp,void**hash_map,double* ad_fac );
    
    
     Ppf_Out  compute_scene_poses(double**scene, int len1,void* model, Ppf_Recommand_Params* prp, void* hash_map, double ad_fac);

     double** my_read_arr(char* file,int *n);

	


#ifdef __cplusplus
}
#endif
// add headers that you want to pre-compile here
//#include "framework.h"



#endif //PCH_H
